package cn.gene.timeyan.common.utils;

import java.time.LocalDateTime;
import java.util.Date;

public class FormUtils {
    public static double parseTimeByDate(Date time){
        if (time==null)return 0;
        return Double.parseDouble(""+time.getYear()+time.getMonth()+time.getDay()+"."+ time.getHours()+time.getMinutes()+time.getSeconds());
    }
    public static double parseTimeByLocalDateTime(LocalDateTime time){
        if (time==null)return 0;
        return Double.parseDouble(""+time.getYear()+time.getDayOfYear()+"."+ time.getHour()+time.getMinute()+time.getSecond());
    }
}
